package JAVA300.第十章IO;

import java.io.*;

/**
 * 转化流
 * 以字符流的形式操作字节流
 */

public class IO_Study12_convert {
    public static void main(String[] args) {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

        //循环获取键盘输入，在写出,知道退出
        String msg = "";
        while (!msg.equals("exit")){
            try {
                msg = reader.readLine();//循环读取
                writer.write(msg);//循环写出
                writer.newLine();
                writer.flush();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }



    }
}
